package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Permission;
import cn.wolfcode.result.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void delete(Long id);

    /**
     * @param employee
     * @param ids:员工担任的角色
     */
    void save(Employee employee, Long[] ids);

    Employee selectById(Long id);

    List<Employee> selectAll();

    /**
     * @param employee
     * @param ids:员工担任的角色
     */
    void update(Employee employee, Long[] ids);

    PageInfo<Employee> query(QueryObject qo);

    /**
     * 登入功能
     *
     * @param username
     * @param password
     * @return
     */
    Employee login(String username, String password);

    void updateForPassword(Long id, String newPassword);

    /**
     * 重置密码
     *
     * @param newPassword
     * @param id
     */
    void resetPassword(String newPassword, Long id);

    void batchDelete(Long[] ids);

    Employee selectByName(String name);

    Workbook exportXls();

    void status(Long id, boolean status);

    void importXls(MultipartFile file) throws IOException;

    List<Employee> selectBySn(String...sn);
}
